﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace TheVoid.Model
{
    public class PersonManager
    {
        Dictionary<string, Person> persons;

        public List<string> IDs { get { return persons.Keys.ToList<string>(); } }

        public PersonManager(string _file, Game _game)
        {
            List<Person> persList = _game.Content.Load<List<Person>>(_file);

            persons = new Dictionary<string, Person>();
            foreach (Person pers in persList)
                persons[pers.Id] = pers;
        }

        public Person GetPerson(string _id)
        {
            if (persons.ContainsKey(_id))
                return persons[_id];

            return null;
        }
    }
}
